<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js">var classUtil = require(&quot;../../utils/class_util&quot;);

var Gradient = require(&quot;./Gradient&quot;);

<span id='qrenderer-graphic-gradient-RadialGradient'>/**
</span> * @class qrenderer.graphic.gradient.RadialGradient 
 * @docauthor 大漠穷秋 &lt;damoqiongqiu@126.com&gt;
 */

<span id='qrenderer-graphic-gradient-RadialGradient-method-constructor'>/**
</span> * @method constructor RadialGradient
 * @param {Number} [x=0.5]
 * @param {Number} [y=0.5]
 * @param {Number} [r=0.5]
 * @param {Array&lt;Object&gt;} [colorStops]
 * @param {Boolean} [globalCoord=false]
 */
var RadialGradient = function RadialGradient(x, y, r, colorStops, globalCoord) {
  // Should do nothing more in this constructor. Because gradient can be
  // declard by `color: {type: &#39;radial&#39;, colorStops: ...}`, where
  // this constructor will not be called.
  this.x = x == null ? 0.5 : x;
  this.y = y == null ? 0.5 : y;
  this.r = r == null ? 0.5 : r; // Can be cloned

  this.type = &#39;radial&#39;; // If use global coord

  this.global = globalCoord || false;
  Gradient.call(this, colorStops);
};

RadialGradient.prototype = {
  constructor: RadialGradient
};
classUtil.inherits(RadialGradient, Gradient);
var _default = RadialGradient;
module.exports = _default;</pre>
</body>
</html>
